//
//  FRNetworking.h
//  Health
//
//  Created by mykoma on 14-9-3.
//  Copyright (c) 2014年 scu.edu. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol FRNetworking <NSObject>

-(void)getFromServer:(NSString *)serverUrl
              action:(NSString *)action
          parameters:(NSArray *)parameters
             success:(void(^)(NSDictionary * responseObject))success
             failure:(void(^)(NSError *error))failure;

-(void)postToServer:(NSString *)serverUrl
             action:(NSString *)action
         parameters:(id)parameters
            success:(void(^)(id responseObject))success
            failure:(void(^)(NSError *error))failure;

- (void)postToServer:(NSString *)serverUrl
              action:(NSString *)action
          parameters:(id)parameters
                data:(NSData *)data
                name:(NSString *)name
            mimeType:(NSString *)mimeType
            fileName:(NSString *)fileName
             success:(void (^)(NSDictionary *))success
             failure:(void (^)(NSError *))failure;

@end
